# -*- coding: utf-8 -*-
# @Author : y
# @Date   : 2021/6/15
# @File   : EG55_EntHisAdmPenaltyCnt.py
# @E-mail : yantao@bbdservice.com

'''eof
name:申请企业历史行政处罚总数
code:EG55_EntHisAdmPenaltyCnt
tableName:
columnName:
groups:企业通用模块
dependencies:EG_DSJ
type:常用指标
datasourceType:在线指标
description:
eof'''
import sys
import pandas as pd
import json
from datetime import datetime

def EG55_EntHisAdmPenaltyCnt():
    try:
        EG_DSJ_1 = EG_DSJ.get('data')
        EG = EG_DSJ_1.get('R1103V3', '')
        if EG == '':
            return '缺失值'
        else:
            caseInfoList = EG.get('caseInfoList', '')
            if caseInfoList == '':
                return '缺失值'
            else:
                return len(caseInfoList)
    except:
        return '缺失值'
result = EG55_EntHisAdmPenaltyCnt()